#include <iostream>
#include <queue>


int main()
{
    std::queue<int> q;

    for(int i = 1; i <= 13; i++)
    {
        q.push(i);
    }
    int count = 0;
    while(q.size() > 1)
    {
        count++;
        int num = q.front();
        q.pop();
        if(count == 3)
        {
            std::cout << num << " DIE\n";
            count = 0;
        }
        else
        {
            q.push(num);
        }
    }
    std::cout << q.front() << "survival" <<std::endl;
    return 0;
}